﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LibreriaVB.Repository;
using LibreriaVB.Models;

namespace LibreriaVB.Controllers
{
    public class HomeController : Controller
    {
        private LibreriaDbContext db = new LibreriaDbContext();
        LibroRepository libroRepository = new LibroRepository();

        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            

            return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult Catalogo()
        {
            ViewBag.libros = libroRepository.GetAll();

            return View();
        }
    }
}
